{include file="common/_header"}
{include file="common/_header1"}

<body class="layui-anim layui-anim-up">
<div class="x-nav">
          <span class="layui-breadcrumb">
            <a href="">首页</a>
            <a href="">订单管理</a>
            <a>
              <cite>商品售后列表</cite></a>
          </span>
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right"
       href="javascript:location.replace(location.href);" title="刷新">
        <i class="layui-icon" style="line-height:30px">ဂ</i></a>
</div>

<div class="x-body">


    <div class="layui-row">
        <form class="layui-form layui-col-md12 x-so">
            <div class="layui-input-inline">
                {if $data.isdisplay}
                <div class="layui-unselect layui-form-select shop_id" style="display:inline-block;">
                    <input type="text" name="shop_name"  placeholder="请输入商铺名称" value="{$data.get['shop_name']}" autocomplete="off" class="layui-input">
                </div>
                {/if}
                <div class="layui-unselect layui-form-select paystate" style="display:inline-block;">
                    <select name="a_s_type" lay-filter="is_use">
                        <option value="">售后类型</option>
                        <option value="1" {$data.get.a_s_type == 1?'selected':''}>{$data.aftertype[1]}</option>
                        <option value="2" {$data.get.a_s_type == 2?'selected':''}>{$data.aftertype[2]}</option>
                    </select>
                </div>
                <button class="layui-btn"  lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>
            </div>

        </form>
    </div>



    <table id="tables" class="layui-table">
        <thead>
        <tr>
            {if $data.isdisplay}
            <th>商铺名称</th>
            {/if}
            <th>用户信息</th>
            <th>订单信息</th>
            <th>售后类型</th>
            <th>商品规格名称</th>
<!--            <th>商品图片</th>-->
            <th>申请售后原因</th>
            <th style="min-width:200px;">上传凭证</th>
            <th>时间</th>
            <th>售后状态</th>
            <th>退款状态</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        {volist name="data.data" id="vo"}
        <tr class="table_tr">
            {if $data.isdisplay}
            <td>{$vo.shop_name}</td>
            {/if}
            <td>
                微信昵称：{$vo.nick_name}<br>
                联系手机号：{$vo.phone}
            </td>
            <td>
                订单号：{$vo.order_product_details.orderno}<br>
                购买数量：{$vo.order_product_details.quantity}<br>
                原价：{$vo.order_product_details.price}<br>
                销售价格：{$vo.order_product_details.sale_price}<br>
                总价：{$vo.order_product_details.amount}
            </td>
            <td>{$data.aftertype[$vo.a_s_type]}</td>
            <td>
                商品名称：{$vo.order_product_details.product_name}<br>
                规格属性：{$vo.order_product_details.p_s_name}<br>
            </td>
<!--            <td><img src="/{//$vo.imagesurl}"></td>-->
            <td>{$vo.content}</td>
            <td>
                {if !empty($vo.images)}
                {volist name="vo.images" key="k" id="v"}
                <a data-magnify="gallery" href="/{$v}">查看图片</a><br>
                {/volist}
                {/if}
            </td>
            <td>
                下单时间：{$vo.order_product_details.order_time|date="Y-m-d H:i:s"}<br>
                支付时间：{$vo.order_product_details.pay_time|date="Y-m-d H:i:s"}<br>
                申请售后时间：{$vo.as_time|date="Y-m-d H:i:s"}<br>
            </td>
            <td>{$data.afterstatus[$vo.a_s_status]}</td>
            <td>
                {if $vo.a_s_type == 2}
                {$data.refundstatus[$vo.is_refund]}
                {else /}
                无
                {/if}
            </td>
            <td>
                <ul class="nav navbar-nav" style=" height: 30px; line-height: 10px;">
                    {if $vo.a_s_status == 1}
                    <li class="dropdown" style="height: 100%;">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" style=" height: 100%; line-height: 5px;">
                            操作
                            <b class="caret"></b>
                        </a>
                        <ul class="dropdown-menu">
                            <li><a title="确认售后完成" onclick="OperateStop('sureafter?a_s_id={$vo.a_s_id}')" href="javascript:;">确认售后</a></li>
                        </ul>
                    </li>
                    {/if}
                    {if $vo.a_s_status == 2 && $vo.is_refund == 1 && $vo.a_s_type == 2}
                    <li class="dropdown" style="height: 100%;">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" style=" height: 100%; line-height: 5px;">
                            操作
                            <b class="caret"></b>
                        </a>
                        <ul class="dropdown-menu">
                            <li><a title="确认已退款" onclick="OperateStop('surerefund?a_s_id={$vo.a_s_id}')" href="javascript:;">确认退款</a></li>
                        </ul>
                    </li>
                    {/if}
                </ul>
            </td>
        </tr>
        {/volist}
        </tbody>
    </table>
    <div class="page_all">
        {$page|raw}
    </div>
</div>
<script>
    // 图片预览插件
    $('[data-magnify]').magnify({
        title: false, // 显示标题
        resizable: false,
        // 开启全屏
        initMaximized: false,
        headerToolbar: [
            'close'
        ],
    });
</script>
</body>

{include file="common/_bottom"}